<!doctype html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="Generator" content="EditPlus®">
		<meta name="Author" content="">
		<meta name="Keywords" content="">
		<meta name="Description" content="">
		<title>点击按钮复制到剪贴板</title>
	</head>

	<body>
		<input type="button" onClick="copyUrl()" value="点击复制代码" />
		<span id="fileNamesText_view" style="margin-right:10px;"><span style="margin-right:10px;"><label></label></span></span>
		<textarea type="hidden" cols="10" rows="10" id="content"></textarea>
		<script src="js/jquery.min.js"></script>
		<script>
			$(function(){
				var $url = $("#fileNamesText_view a.preview");
				var baseUrl = "http://erp.oxobook.com/commonController/toShowPdfView?fileUrl=";
				var　html = "";
				for(var i = 0; i < $url.length; i++) {
					html += $url.eq(i).html()+"："+baseUrl+$url.eq(i).data("value") + "\n";
				}
				$("#content").html(html);
			});
			
			function copyUrl(){
				alert($("#content").html().length);
				var Url2=document.getElementById("content");
				Url2.select(); // 选择对象
				document.execCommand("Copy"); // 执行浏览器复制命令
			}

		</script>
	</body>
	
</html>